package com.qc.controller;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

@Controller
public class VideoCallController {

    @MessageMapping("/exchange/message")
    @SendTo("/topic/exchange")
    public Message handleMessage(@Payload Message message) {
        // 处理接收到的消息，例如日志记录、数据验证等
        return message; // 将消息广播给所有订阅了/topic/exchange的客户端
    }
}

class Message {
    private String from;
    private String content;

    // Getters and Setters
}